package com.atguigu.gmall.order.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author:lyd
 * @Date:2023/9/10 10:19
 * @Version:1.0
 * @Description 封装拆单后返回给库存系统的数据
 **/
@NoArgsConstructor
@Data
public class OrderSplitChildVo {

    @JsonProperty("orderBody")
    private String orderBody;
    @JsonProperty("consignee")
    private String consignee;
    @JsonProperty("consigneeTel")
    private String consigneeTel;
    @JsonProperty("orderComment")
    private String orderComment;
    @JsonProperty("wareId")
    private Long wareId;
    @JsonProperty("orderId")
    private Long orderId;
    @JsonProperty("deliveryAddress")
    private String deliveryAddress;

    //购买商品明细
    //例如：
    //details:[{skuId:101,skuNum:1,skuName:
    //’小米手64G’},
    //{skuId:201,skuNum:1,skuName:’索尼耳机’}]
    @JsonProperty("details")
    private List<DetailsDTO> details;
    @JsonProperty("paymentWay")
    private String paymentWay;

    @NoArgsConstructor
    @Data
    public static class DetailsDTO {
        @JsonProperty("skuName")
        private String skuName;
        @JsonProperty("skuId")
        private Long skuId;
        @JsonProperty("skuNum")
        private Integer skuNum;
    }
}
